package ch6.ex10;

import static ch6.print.Print.*;

class Component1 {
	public Component1(int i) {
		println("Component1 " + i);
	}
}

class Component2 {
	public Component2(int i) {
		println("Component2 " + i);
	}
}

class Component3 {
	public Component3(int i) {
		println("Component3 " + i);
	}
}

class Root {
	static{
		println("RootA");
	}
	Component1 c1 = new Component1(1);
	Component2 c2 = new Component2(2);
	Component3 c3 = new Component3(3);

	public Root(int i) {
		println("RootB");
	}
}

class Stem extends Root {
	static {
		println("StemA");
	}
	Component1 c1 = new Component1(4);
	Component2 c2 = new Component2(5);
	Component3 c3 = new Component3(6);

	public Stem(int i) {
		super(i);
		println("StemB");
	}
}

public class ConstructorOrder {
	public static void main(String... args) {
		new Stem(1);
	}

}
